import {Check} from '../../../../mock/user/'

module.exports = {
	name: 'check',
	data() {
		return {
			waterDeliverCheckList:[],
			waterStoreCheckList:[],
			checkShow:'waterDeliver',
			checkShowString:'配送员',
		}
	},
	methods:{
		getList() {
			this.waterDeliverCheckList = this.formProduct(Check.data.waterDeliver);
			this.waterStoreCheckList = this.formProduct(Check.data.waterStore);
		},
		formProduct(checkList) {
			return checkList.map(check => {
				check.modifiedTime = this.$$formatTime1(check.modifiedTime);
				return check;
			})
		},
		//根据下拉菜单的值显示不同的用户列表
		handleCommand(command) {
			this.checkShow = command;
			this.checkShowString = command === 'waterDeliver' ? '配送员' : '水店';
		},
	},
	created() {
		this.getList();
	}
}